def findMinAndMax(L):
    if(L == []):
        return (None,None)
    min = L[0]
    max = L[0]
    for num in L:
        if(num > max):
            max = num
        if(num < min):
            min = num
    return (min,max)